Isomorphic Interpreters from Logically Reversible Abstract Machines

نویسندگان

  • Roshan P. James
  • Amr Sabry
چکیده

In our previous work, we developed a reversible programming language and established that every computation in it is a (partial) isomorphism that is reversible and that preserves information. The language is founded on type isomorphisms that have a clear categorical semantics but that are awkward as a notation for writing actual programs, especially recursive ones. This paper remedies this aspect by presenting a systematic technique for developing a large and expressive class of reversible recursive programs, that of logically reversible smallstep abstract machines. In other words, this paper shows that once we have a logically reversible machine in a notation of our choice, expressing the machine as an isomorphic interpreter can be done systematically and does not present any significant conceptual difficulties. Concretely, we develop several simple interpreters over numbers and addition, move on to tree traversals, and finish with a meta-circular interpreter for our reversible language. This gives us a means of developing large reversible programs with the ease of reasoning at the level of a conventional smallstep semantics.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Automating Abstract Interpretation of Abstract Machines

Static program analysis is a valuable tool for any programming language that people write programs in. The prevalence of scripting languages in the world suggests programming language interpreters are relatively easy to write. Users of these languages lament their inability to analyze their code, therefore programming language analyzers are not easy to write. This thesis investigates a systemat...

متن کامل

Compiling Abstract State Machines

Abstract State Machines (ASMs) have been widely used to specify software and hardware systems. Only a few of these specifications are executable, although there are several interpreters and some compilers. This paper introduces a compilation scheme to transform an ASM specification in the syntax of the ASM-Workbench into C++. In particular, we transform algebraic types, pattern matching, functi...

متن کامل

Compiling Abstract State Machines to C++

Abstract State Machines (ASMs) have been widely used to specify software and hardware systems. Only a few of these specifications are executable, although there are several interpreters and some compilers. This paper introduces a compilation scheme to transform an ASM specification in the syntax of the ASM-Workbench into C++. In particular, we transform algebraic types, pattern matching, functi...

متن کامل

Compiling Dataaow into Threads Eecient Compiler-controlled Multithreading for Lenient Parallel Languages Compiling Dataaow into Threads Eecient Compiler-controlled Multithreading for Lenient Parallel Languages Compiling Dataaow into Threads Eecient Compiler-controlled Multithreading for Lenient Parallel Languages

Powerful non-strict parallel languages require fast dynamic scheduling. This thesis explores how the need for multithreaded execution can be addressed as a compilation problem, to achieve switching rates approaching what hardware mechanisms might provide. Compiler-controlled multithreading is examined through compilation of a lenient parallel language, ID90, for a threaded abstract machine, TAM...

متن کامل

The Theory and Practice of Programming Languages with Delimited Continuations

This dissertation presents a study of functional programming languages with first-class delimited continuations. We focus mainly on theoretical and practical aspects of Danvy and Filinski’s hierarchy of static delimited-control operators shiftn and resetn, and of Felleisen’s dynamic delimited-control operators control and prompt. Our study uses the traditional means of specifying semantics of f...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2012